package Day32;

public class Text1 {
    public static void main(String[] args) {
        Cellphone cellphone = new Cellphone();
        cellphone.testWork(new IA(){
            @Override
            public double work(double n1, double n2) {
                return n1 + n2;
            }
        },2,3);
    }
}

interface IA{
    public double work(double n1, double n2);
}


class Cellphone{
    Cellphone(){
    }


    public void  testWork(IA ia, double n1, double n2){
        double result  = ia.work(n1,n2);
        System.out.println("计算的结果是"  + result);
    }

}
